<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Home</title>
</head>
<body>
    <h2>Home</h2>
    <hr>
    {# 模板语言的注释 #}
    <h4>变量</h4>
    <p>name:{{ name }}</p>
    <p>age:{{ age }}</p>
    <p>likes:{{ likes }}</p>
    <hr>
    <h4>标签：</h4>
    <h5>if语句</h5>
    {% if age >= 18 %}
    	<p>{{ name }}已经成年了</p>
    {% elif age >= 6 %}
        <p>{{ name }} 可以上学了</p>
    {% else %}
        <p>{{ name }} 还是小孩</p>
    {% endif %}
    <h5>for循环</h5>
    {% for like in likesq %}
    	{% if loop.first %}
    		<p style="color:  red">{{ like }}</p>
        {% elif loop.last %}
            <p style="color: blue">{{ like }}</p>
        {% else %}
            <p>{{ like }}</p>
    	{% endif %}
        index:{{ loop.index }}
        index:{{ loop.index0 }}
        index:{{ loop.revindex }}
        index:{{ loop.revindex0 }}
    {% else %}
        <p><h5>else</h5></p>
    {% endfor %}

</body>
</html>